Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): [NMI] Implement 3DS for Cards #3143

Merged
merged 5 commits into from
Dec 17, 2023
Merged

feat(connector): [NMI] Implement 3DS for Cards #3143

merged 5 commits into from
Dec 17, 2023

Conversation

Sakilmostak
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

The flow use:

  • Vaulting the card data in pre processing flow
  • Invoking SDK in redirection
  • Complete Payment using complete auth flow

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

No testing can be done since 3DS is not enabled in test account

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Sakilmostak Sakilmostak added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Dec 15, 2023
@Sakilmostak Sakilmostak self-assigned this Dec 15, 2023
@Sakilmostak Sakilmostak requested review from a team as code owners December 15, 2023 13:18
@@ -1479,6 +1479,13 @@ where
let is_error_in_response = router_data.response.is_err();
// If is_error_in_response is true, should_continue_payment should be false, we should throw the error
(router_data, !is_error_in_response)
} else if connector.connector_name == router_types::Connector::Nmi
&& !matches!(format!("{operation:?}").as_str(), "CompleteAuthorize")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in case of Payment Confirm we need to trigger Preprocessing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preprocessing_steps is only implemented for authorize and complete auth flow meaning only these two flow can execute preprocessing. if it matches complete auth flow, it wont enter the body since it is a not operation, leaving only auth flow to enter this body.

Comment on lines 121 to 124
_ => Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "nmi",
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_ => Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "nmi",
})
_ => Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Nmi"),
))

let three_ds_data: NmiRedirectResponseData = serde_json::from_value(payload_data)
.into_report()
.change_context(errors::ConnectorError::MissingConnectorRedirectionPayload {
field_name: "cavv",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change "cavv" to "three_ds_data" as cavv is one of the param inside three_ds_data

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Dec 17, 2023
Merged via the queue into main with commit 7df4523 Dec 17, 2023
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the nmi_3ds branch December 17, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants